<html>

<head>
<title>SQL Relay - Getting Started With Sybase - Initializing an 15.0.2 Server</title>
<link rel="stylesheet" href="../../css/styles.css">
</head>

<body>

<span class="heading1">Installing and Initializing an 15.0.2 Server</span><br>

<p>To install and initialize Sybase Adaptive Server Enterprise, follow these
instructions.</p>

<span class="heading2">Install Required Packages</span><br>

<p>Sybase ASE version 15.0.2 requires older versions of libstdc++- than ship
with most modern Linux distributions.  You will need to install
compat-libstdc++-33 and compat-libstdc++-296.</p>

<p>You will also need to install libaio.</p>

<p>These packages are available from <a href="http://rpmfind.net">rpmfind</a>
or using yum.</p>

<span class="heading2">Set Kernel Parameters</span><br>

<p>The database server requires more shared memory than the typical linux
system is configured to allow by default.  Run the following command (as root)
prior to installation.</p>

<blockquote><b>
echo 268435456 > /proc/sys/kernel/shmmax
</b></blockquote>

<span class="heading2">Download Upgrade</span><br>

<p>Many modern versions of linux use NPTL (Native Posix Theading Library), but
Sybase 15.0.2 requires the old Linuxthreads implementation.  Some versions of
Linux such as Fedora Core 4 support both.  But as of Fedora Core 5, Linuxthreads
support was dropped.  The same may hold true for other modern distro's.
The Sybase 15.0.2 installer will run on a linux that doesn't support
Linuxthreads, but the DB will fail to start.</p>

<p>However Sybase has released an update that will allow Sybase 15.0.2 to run
on an OS that uses NTPL.  Go to the Sybase website, search for EBF15682 and
download EBF15682.tgz.</p>

<span class="heading2">Extract The Distribution</span><br>

<p>The distribution comes as a tarball.  Extract it as follows:</p>

<blockquote><b>
mkdir sybase<br>
mv ase1502_xe_linux.tgz sybase<br>
cd sybase<br>
tar xfz ase1502_xe_linux.tgz<br>
</b></blockquote>

<p>The Sybase update comes as a tarball as well.  Extract it as follows:</p>

<blockquote><b>
mkdir ebf<br>
mv EBF15672.tgz ebf<br>
cd ebf<br>
tar xfz EBF15672.tgz<br>
</b></blockquote>

<span class="heading2">Install The Software Distribution</span><br>

<p>Now, go into the directory the sybase software distribution was extracted
into and, as root, run the following command:</p>

<blockquote><b>./setup</b></blockquote>

<p>A java-based installer should run.</p>

<p>When prompted <b>What would you like to install?</b>, check the Adaptive
Server Enterprise (Express Edition) check box.<br>
Click Next.</p>

<P>When prompted for the <b>End-user license agreement</b> select All regions
from the <b>Please Select</b> pulldown.<br>
Read the license and click the <b>I agree to the terms of the Sybase license,
for the install location specified.</b> check box.<br>
Click Next.</p>

<p>When prompted for a <b>Destination Directory</b>, accept the default
"/opt/sybase"<br>
Click Next.</p>

<p>If prompted with <b>The directory does not exist.
Do you want to create it?</b><br>
Click Yes.</p>

<p>On the screen titled: <b>Choose the setup type that best suits your
needs</b><br>
Accept the default <b>Typical</b> radio button.<br>
Click Next.</p>

<p>An installation summary page will appear, indicating what will be installed,
what directory, and the total size of the installation.<br>
Click Next.</p>

<p>A screen titled <b>Installing Sybase Adaptive Server Enterprise Suite.
Please wait...</b> will appear with a progress bar indicating how much of
the installation has been completed.  When that is finished, click Next.</p>

<p>A screen will pop up asking <b>Do you want to configure email alerts?</b>  Click No and click Next.</p>

<p>On the screen titled <b>Please deselect any servers that you do not want to
configure now:</b><br>
Uncheck all checkboxes and Click Next.</p>

<p>A screen will appear titled <b>The installation was successful</b><br>
Click Finish.</p>

<span class="heading2">Install The Update</span><br>

<p>Now, go into the directory the update was extracted into and, as root, run
the following command:</p>

<blockquote><b>./setup</b></blockquote>

<p>A java-based installer should run.  On the main page, click Next.</p>

<P>When prompted for the <b>End-user license agreement</b> select the country
that you are in from the <b>Please Select</b> pulldown.<br>
Read the license and click the <b>I agree to the terms of the Sybase license,
for the install location specified.</b> check box.<br>
Click Next.</p>

<p>When prompted for a <b>Destination Directory</b>, accept the default
"/opt/sybase"<br>
Click Next.</p>

<p>When prompted whether you want to continue with the installation even though
it will overwrite existing software, click Yes.</p>

<p>On the screen titled: <b>Choose the setup type that best suits your
needs</b><br>
Accept the default <b>Update</b> radio button.<br>
Click Next.</p>

<p>When prompted <b>Choose the </b>, check the Adaptive
Server Enterprise (Express Edition) check box.<br>
Click Next.</p>

<p>An page will appear, indicating what will be installed, and what will be
updated.  Click Next.<br>

<p>An installation summary page will appear, indicating what will be installed,
what directory, and the total size of the installation.<br>
Click Next.</p>

<p>A screen titled <b>Installing Sybase Adaptive Server Enterprise Suite.
Please wait...</b> will appear with a progress bar indicating how much of
the installation has been completed.  When that is finished, click Next.</p>

<p>On the screen titled <b>Please deselect any servers that you do not want to
configure now:</b><br>
Check all checkboxes and Click Next.</p>

<p>On the screen titled <b>Please select the products that you want to
custom configure:</b><br>
Leave all checkboxes unchecked and Click Next.</p>

<p>A summary page will appear with values for that each server will be
configured with.<br>
Click Next.</p>

<p>A screen will appear titled <b>Configure New Adaptive Server</b> with
progress messages indicating what step is currently being executed.  This
stage will fail at "Starting server" if shmmax wasn't configured properly.</p>

<p>A screen will appear titled <b>Configure New Backup Server</b> with
progress messages indicating what step is currently being executed.</p>

<p>A screen will appear titled <b>Configure New Monitor Server</b> with
progress messages indicating what step is currently being executed.</p>

<p>A screen will appear titled <b>Configure New XP Server</b> with
progress messages indicating what step is currently being executed.</p>

<p>A screen will appear titled <b>The installation was successful</b><br>
Click Finish.</p>

<span class="heading2">Starting the Database at Boot Time</span><br>

<p>The RPM distribution of Sybase ASE installs a script in /etc/rc.d/init.d 
which starts the database at boot time.  For non-RPM distributions, you may 
need to install a script like the following.  Replace <i>/opt/sybase</i> 
with whatever directory Sybase ASE is installed in.</p>

<blockquote>
<PRE>
<FONT color=#0000ff>#!/bin/sh</FONT>

<B><FONT color=#a62828>export </FONT></B><FONT color=#008a8e>SYBASE</FONT><B><FONT color=#a62828>=</FONT></B>/opt/sybase</FONT>

<B><FONT color=#a62828>export </FONT></B><FONT color=#008a8e>PATH</FONT><B><FONT color=#a62828>=</FONT></B><FONT color=#a620f7>$PATH</FONT>:<FONT color=#a620f7>$SYBASE</FONT>/ASE-15_0/bin:<FONT color=#a620f7>$SYBASE</FONT>/ASE-15_0/install

<font color="#a52829"><b>echo</b></font><font color="#ff00ff"> 268435456 </font><font color="#a52829"><b>&gt;</b></font> /proc/sys/kernel/shmmax

<B><FONT color=#a62828>case</FONT></B> &quot;$1&quot; <B><FONT color=#a62828>in</FONT></B>
        start<B><FONT color=#a62828>)</FONT></B>
                <B><FONT color=#a62828>for</FONT></B> i <B><FONT color=#a62828>in</FONT></B> <FONT color=#6959cf>`ls </FONT><FONT color=#a620f7>$SYBASE</FONT><FONT color=#6959cf>/ASE-15_0/install/RUN_*`</FONT>
                <B><FONT color=#a62828>do</FONT></B>
                        su <B><FONT color=#a62828>-c</FONT></B> <B><FONT color=#a62828>&quot;</FONT></B><FONT color=#ff00ff>startserver -f </FONT><FONT color=#a620f7>$i</FONT><B><FONT color=#a62828>&quot;</FONT></B> <B><FONT color=#a62828>&gt;</FONT></B> /dev/null <B><FONT color=#a62828>2&gt;&amp;1</FONT></B><B><FONT color=#a62828>;</FONT></B>
                <B><FONT color=#a62828>done</FONT></B>
                <B><FONT color=#a62828>;;</FONT></B>
        stop<B><FONT color=#a62828>)</FONT></B>
                <B><FONT color=#a62828>kill</FONT></B> <FONT color=#6959cf>`ps </FONT><FONT color=#6959cf>-efa</FONT><FONT color=#6959cf> </FONT><B><FONT color=#a62828>|</FONT></B><FONT color=#6959cf> grep sybase </FONT><B><FONT color=#a62828>|</FONT></B><FONT color=#6959cf> grep </FONT><FONT color=#6959cf>-v</FONT><FONT color=#6959cf> grep </FONT><B><FONT color=#a62828>|</FONT></B><FONT color=#6959cf> awk </FONT><B><FONT color=#a62828>'</FONT></B><FONT color=#ff00ff>{print $2}</FONT><B><FONT color=#a62828>'</FONT></B><FONT color=#6959cf>`</FONT>
                <B><FONT color=#a62828>;;</FONT></B>
        *<B><FONT color=#a62828>)</FONT></B>
                <B><FONT color=#a62828>echo</FONT></B><FONT color=#ff00ff> $</FONT><B><FONT color=#a62828>&quot;</FONT></B><FONT color=#ff00ff>Usage: </FONT><FONT color=#a620f7>$0</FONT><FONT color=#ff00ff> {start|stop}</FONT><B><FONT color=#a62828>&quot;</FONT></B>
                <B><FONT color=#a62828>exit</FONT></B> <FONT color=#ff00ff>1</FONT>
<B><FONT color=#a62828>esac</FONT></B>

<B><FONT color=#a62828>exit</FONT></B> <FONT color=#ff00ff>0</FONT>
</PRE>
</blockquote>

<p>Install this script and run it with the "start" option to start up the
database.  Running it with the "stop" option shuts the database down.  To
access a database, it must be running.</p>

</body>

</html>
